package nihe;
import nihe.*;
import java.io.*;

public class ZhiXianShuChu
{
	public ZhiXianShuChu(String str)
	{
		File sc=new File(str);
		try
		{
			if(!sc.exists())
				sc.createNewFile();
			ZhiXian zhx=new ZhiXian();
			FileOutputStream fout=new FileOutputStream(str);
			String str1="拟合方式:直线拟合\n";
			String str2="参数a="+zhx.a+",参数b="+zhx.b+"\n";
			String str3="";
			for(int j=0;j<zhx.db3.length;j++)
			{
				str3=str3+zhx.db1[j]+"\t\t"+zhx.db2[j]+"\t\t"+zhx.db3[j]+"\n";
			}
			byte buf1[]=str1.getBytes();
			byte buf2[]=str2.getBytes();
			byte buf3[]=str3.getBytes();
			fout.write(buf1);
			fout.write(buf2);
			fout.write(buf3);
			fout.close();
		}
		catch(IOException e)
		{
			System.err.println(e);
		}
	}
}